//
//  LCLeftCell.m
//  YinYueTai
//
//  Created by CongCong on 15-7-20.
//  Copyright (c) 2015年 CongCong. All rights reserved.
//

#import "LCLeftCell.h"

@implementation LCLeftCell

- (void)awakeFromNib {
    // Initialization code
}
- (IBAction)stop:(id)sender {
    self.stopButton.selected = !self.stopButton.selected;
    if (self.stopButton.selected) {
        [[AFSoundManager sharedManager]pause];
    }
    else
    {
        [[AFSoundManager sharedManager]resume];
    }
}

- (IBAction)next:(id)sender {
    [[LCRdListenViewController shareListen] nextMusic];
}

- (void)showModel:(LCRdDetailListModel *)model withPlay:(BOOL)play
{
    [self.imageView sd_setImageWithURL:[NSURL URLWithString:model.coverimg] placeholderImage:[UIImage imageNamed:@"hoder"]];
    
//    if (play) {
//        self.iconimage.image = [UIImage imageNamed:@"stop"];
//    }
//    else
//    {
//        self.iconimage.image = [UIImage imageNamed:@"play"];
//    }
    [self.stopButton setBackgroundImage:[UIImage imageNamed:@"play"] forState:UIControlStateSelected];
    [self.stopButton setBackgroundImage:[UIImage imageNamed:@"stop"] forState:UIControlStateNormal];
    self.title.text = model.title;
    self.autor.text = model.playInfo.authorinfo.uname;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

@end
